package com.spsyry.order;

import com.spsyry.common.security.annotation.EnableCustomConfig;
import com.spsyry.common.security.annotation.EnableRyFeignClients;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;



@SpringBootApplication
@EnableCustomConfig
@EnableRyFeignClients
public class OrderApplication {
    public static void main(String[] args) {
        SpringApplication.run(OrderApplication.class,args);
        System.out.println("(♥◠‿◠)ﾉﾞ  订单模块启动成功   ლ(´ڡ`ლ)ﾞ  \n" +
                " .-------.       ____     __        \n" +
                " |  _ _   \\      \\   \\   /  /    \n" +
                " | ( ' )  |       \\  _. /  '       \n" +
                " |(_ o _) /        _( )_ .'         \n" +
                " | (_,_).' __  ___(_ o _)'          \n" +
                " |  |\\ \\  |  ||   |(_,_)'         \n" +
                " |  | \\ `'   /|   `-'  /           \n" +
                " |  |  \\    /  \\      /           \n" +
                " ''-'   `'-'    `-..-'              ");
    }
//    @Bean
//    public CommandLineRunner runOrderDataInsert(JdbcTemplate jdbcTemplate) {
//        return args -> {
//            System.out.println("=== 项目启动完成，开始自动插入500万条订单数据 ===");
//            long startTime = System.currentTimeMillis();
//
//            // 创建数据生成器并执行插入
//            OrderDataGenerator dataGenerator = new OrderDataGenerator(jdbcTemplate);
//            dataGenerator.generateAndInsertData();
//
//            // 计算总耗时
//            long totalTime = (System.currentTimeMillis() - startTime) / 1000;
//            System.out.printf("=== 订单数据插入完成！总耗时：%d分%d秒 ===%n", totalTime / 60, totalTime % 60);
//        };
//    }

}
